<?php
	// $_REQUEST["login"]='iziitoms';
	// $_REQUEST["mdp"]='mdpthomas';
	$pdo=new PDO("mysql:dbname=studyshare;host=127.0.0.1","root","");
	$statement=$pdo->prepare("SELECT * FROM personne WHERE login = '".$_REQUEST['login']."' AND mdp = '".$_REQUEST['mdp']."'");
	$statement->execute();
	$results=$statement->fetchAll(PDO::FETCH_ASSOC);
	$taille = sizeof($results);
	if($taille > 0){
		$results=["result" => true];
	}else{	
		$results=["result" => false];
	}
	$json=json_encode($results);
	print(json_encode($results));
?>
  